package com.mangguo.tingjian.account.dto;

import com.mangguo.tingjian.account.entity.Authority;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class UserDto implements Serializable {

    private static final long serialVersionUID = 4340742049451989791L;

    private Long id;

    @NotNull
    private String username;

    private String password;

    private String trueName;

    private String email;

    private String avatar;
    @NotNull
    private Integer deptId;
    @NotNull
    private Integer roleId;

    private Integer isValid;

    private Integer deleteFlag;

    private Date createTime;

    private Date updateTime;

    private Set<Authority> authorities = new HashSet<>();

}
